package business;

public class CellXLEW {

	private String code;
	private int sheet;
	private int row;
	private int col;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public int getSheet() {
		return sheet;
	}

	public void setSheet(int sheet) {
		this.sheet = sheet;
	}

	public int getRow() {
		return row;
	}

	public void setRow(int row) {
		this.row = row;
	}

	public int getCol() {
		return col;
	}

	public void setCol(int col) {
		this.col = col;
	}

	public CellXLEW(String code) {
		super();
		this.code = code;
		if(code != null && code.trim().length() > 0 && code.trim().startsWith("XLEW_"))
		{
			String[] split = code.split("[_]");
			if (split.length == 4)
			{
				this.sheet = Integer.valueOf(split[1]);
				this.row = Integer.valueOf(split[2]);
				this.col = Integer.valueOf(split[3]);
			}
		}
	}
}